Add support for controlling Z1 arm mounted on Aliengo quadruped (aliengoZ1 model)#7
Open
paulblum wants to merge 1 commit intounitreerobotics:masterfrom
Open
Add support for controlling Z1 arm mounted on Aliengo quadruped (aliengoZ1 model)#7paulblum wants to merge 1 commit intounitreerobotics:masterfrom
paulblum wants to merge 1 commit intounitreerobotics:masterfrom
Conversation
…ounted on quadruped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses issue #6 by extending support for controlling the Unitree Z1 robotic arm when it is mounted on a quadruped; e.g., using the
aliengoZ1_descriptionmodel inunitree_ros.Issue:
aliengoZ1_descriptionin GazeboCurrently, the
z1_controllerrepository provides a ROS control interface for the Unitree Z1 robotic arm in the/z1_gazebonamespace:z1_descriptionin Gazebo byz1_controllerHowever, there is a need to extend support for controlling the Z1 arm when it is mounted on a quadruped model with a different namespace. For example, using the
aliengoZ1_descriptionmodel where the namespace is/aliengoZ1_gazebo:aliengoZ1_descriptionin Gazebo byz1_controller; note dead and leaf topics due to namespace mismatchThe issue stems from a hard-coding of the
/z1_gazebonamespace within the Z1 control interface for ROS Gazebo simulation,IOROS:z1_controller/sim/IOROS.cpp
Lines 67 to 85 in 8eb6595
Proposed Changes:
Implement a mechanism to automatically detect the correct namespace based on the model being used when
z1_controllerbegins execution, and use it to configure the namespace of ROS topics for Z1 joint control.Insights:
aliengoZ1_description) initialize a ROS parameter called/robot_namein their launch files, each specifying a model's unique namespace./robot_nameparameter can be retrieved and used to configure theIOROSinterface with the correct namespace for Z1 joints./robot_nameparameter; the original/z1_gazebonamespace should be used in this case.Implementation details:
_rnameof typestd::stringto theIOROSclass.IOROSinitialization,_rnamestores/robot_nameretrieved from the ROS parameter server, defaulting to"z1"if no such parameter is found._rnameconfigures the namespace for Z1 joints wheneverIOROS::_initSend()orIOROS::_initRecv()are invoked.Results:
The modification maintains
z1_controller's functionality for control ofz1_descriptionin Gazebo, while enabling the capability ofz1_controllerto control the Z1 arm when it exists in a different robot namespace:z1_descriptionin Gazebo by updatedz1_controlleraliengoZ1_descriptionin Gazebo by updatedz1_controllerunitree_servoandz1_controller's demo trajectory visualized here